import Vue from 'vue'

let vue = new Vue()

export function goodsCategoryList() {
  return vue.$fly.request({
    url: `/goods/categories`,
    method: 'GET'
  })
}

export function goods(current, size, params) {
  return vue.$fly.request({
    url: `/goods/list`,
    method: 'GET',
    params: {
      ...params,
      current,
      size,
    }
  })
}

export function goodDetail(goodsId) {
  return vue.$fly.request({
    url: `/goods/detail`,
    method: 'GET',
    params: {
      goodsId,
    }
  })
}
